﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace RoadTeam.Pub
{
    public class FileOperate
    {
        /// <summary>
        /// 判断指定文件夹下的文件是否存在
        /// </summary>
        /// <param name="Path">文件夹路径最后是没有[\]的</param>
        /// <param name="FileName">文件名称包含后缀</param>
        /// <returns>是否存在</returns>
        public static bool FileExist(String Path, String FileName)
        {
            DirectoryInfo TheFolder = new DirectoryInfo(Path);
            if (!TheFolder.Exists) return false;
            FileInfo TheFile = new FileInfo(Path + "\\" + FileName);
            if (!TheFile.Exists) return false;
            return true;
        }
    }
}
